package com.foreknow.test_Interface.demo04;

public class Hero extends ActionCharacter implements CanFly,CanSwim{
    public String name;

    public void Hero(String name) {
        this.name = name;
    }

    @Override
    void fight(String emp) {
        System.out.println(name+" fight");
    }

    @Override
    public void fly() {
        System.out.println(name+" fly");
    }

    @Override
    public void swim() {
        System.out.println(name+" swim");
    }

    @Override
    void speak(String s) {
        System.out.println(name+" "+s);
    }
}
